﻿/* 2012/10/24 */
using System;
using System.Collections.Generic;

namespace Cosmos.IO.FileSystemPath.Provider
{
    /// <summary>
    /// Provides data for the FilePathAdded event.
    /// </summary>
    public class PathAddedEventArgs : EventArgs
    {
        private string[] _paths;

        /// <summary>
        /// Initializes a new instance of the PathAddedEventArgs class.
        /// </summary>
        public PathAddedEventArgs(IEnumerable<string> paths)
        {
            List<string> pathList = new List<string>(paths);
            _paths = pathList.ToArray();
        }

        /// <summary>
        /// Gets paths which have been added.
        /// </summary>
        public string[] Paths
        {
            get
            {
                return _paths;
            }
        }
    }

    /// <summary>
    /// Represents the method that will handle the FilePathAdded event.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">A PathAddedEventArgs that contains the event data.</param>
    public delegate void PathAddedEventHandler(object sender, PathAddedEventArgs e);
}
